package com.example.a623

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_home.*

class Home : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_home)

        nav.setOnNavigationItemSelectedListener { item->
            when(item.itemId)
            {R.id.nav_home->startActivity(Intent(applicationContext,Home::class.java))
                R.id.nav_occasion->startActivity(Intent(applicationContext,occasion::class.java))
                R.id.nav_message->startActivity(Intent(applicationContext,message::class.java))
                R.id.nav_mine->startActivity(Intent(applicationContext,mine::class.java))
            }
            true
        }
    }
}